import request from '@/utils/request'

// 获取全部仓库数据
export const getAllWarehouse = params => request({
  url: '/api/warehouse/page',
  params
})

// 获取新建信息的基础信息
export const addInfo = () => request({
  url: '/api/codeFactory/next/CK'
})

// 新建信息
export const addWarehouseInfo = data => request({
  url: '/api/warehouse',
  method: 'POST',
  data
})

// 编辑信息
export const editWarehouseInfo = id => request({
  url: `/api/warehouse/${id}`
})

// 修改信息
export const putWarehouseInfo = data => request({
  url: '/api/warehouse',
  method: 'PUT',
  data
})

// 删除信息
export const delWarehouseInfo = id => request({
  url: `/api/warehouse?ids[]=${id}`,
  method: 'DELETE'
})
